package com.chencs.common.lmadmin.service;

import com.chencs.common.lmadmin.mapper.LmWebSubjectMapper;
import com.chencs.vo.biz.lianmeng.LmProduct;
import com.chencs.vo.biz.lianmeng.LmSubject;
import com.chencs.vo.biz.lianmeng.LmSubject_Pro;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LmSubjectService {


    @Autowired
    private LmWebSubjectMapper subjectMapper;




    public  List<LmSubject> subjec_List(){
        return subjectMapper.subjec_List();
    }

    public List<LmProduct> getProductBySid(String sid){
        return  subjectMapper.getProductBySid(sid);
    }

    public void delSubjectProById(String id){
        subjectMapper.delSubjectProById(id);
    }

    public void delSubjectBySid(String sid){
        subjectMapper.delSubjectProBySid(sid);
        subjectMapper.delSubjectBySid(sid);
    }

    public LmSubject findSubjectBySid(String id){
      return  subjectMapper.findSubjectBySid(id);
    }

    public void insertSubject(LmSubject subject){
        subjectMapper.insertSubject(subject);
    }

    public void insertSubjectPro(LmSubject_Pro subject_pro){
        subjectMapper.insertSubjectPro(subject_pro);
    }

    public void updateSubject(LmSubject subject){
        subjectMapper.updateSubject(subject);
    }

}
